package com.molichuxing.services.business.dto.response;

import com.molichuxing.framework.dto.ResponseRootDto;
import lombok.Data;

import java.util.Objects;

/**
 * 商品销量统计 biz dto
 *
 * @Author zoumingyu
 * @Date 2020年04月13日
 */
@Data
public class GoodsSalesStatisticsBizDto extends ResponseRootDto {
    private static final long serialVersionUID = 6277794604657766226L;

    /**
     * 商品id
     */
    private Integer goodsId;

    /**
     * 里程包id（订阅订单才有）
     */
    private Integer packageMileageId;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 车型id
     */
    private Integer vehicleId;

    /**
     * 销量
     */
    private Integer sales;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GoodsSalesStatisticsBizDto that = (GoodsSalesStatisticsBizDto) o;
        return Objects.equals(goodsId, that.goodsId) &&
                Objects.equals(packageMileageId, that.packageMileageId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(goodsId, packageMileageId);
    }
}
